Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add caching of Python dependencies in GitHub action workflow #867

Closed
wants to merge 11 commits into from

Conversation

sweep-nightly[bot]
Copy link
Contributor

@sweep-nightly sweep-nightly bot commented Jul 29, 2023

Description

This PR adds caching of Python dependencies in the GitHub action workflow to speed up the build process. The caching step is added before the step that installs the Python dependencies. The cache key is based on the hash of the pyproject.toml file, which is the source of truth for dependencies in this project. If the pyproject.toml file changes, the cache will be invalidated and the dependencies will be re-downloaded.

Summary of Changes

  • Added caching step in the GitHub action workflow to cache Python dependencies
  • Cache key is based on the hash of the pyproject.toml file
  • If the pyproject.toml file changes, the cache will be invalidated and the dependencies will be re-downloaded

Fixes #866.

To checkout this PR branch, run the following command in your terminal:

git checkout sweep/add-caching-python-dependencies

@sweep-nightly sweep-nightly bot added the sweep Assigns Sweep to an issue or pull request. label Jul 29, 2023
@vercel
Copy link

vercel bot commented Jul 29, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
sweep-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 29, 2023 10:47pm

@sweep-nightly
Copy link
Contributor Author

sweep-nightly bot commented Jul 29, 2023

GitHub actions yielded the following error.

The command that failed is actions/setup-python@v2 with the error message "Version 3.1 with arch x64 not found". Here are the relevant lines from the logs:

##[group]Run actions/setup-python@v2
with:
python-version: 3.1
token: ***
##[endgroup]
Version 3.1 was not found in the local cache
##[error]Version 3.1 with arch x64 not found
list of all available versions can be found here: https://raw.githubusercontent.com/actions/python-versions/main/versions-manifest.json

This is likely a linting or type-checking issue with the source code but if you are updating the GitHub Actions or versioning, this could be an issue with the GitHub Action yaml files.

@sweep-nightly
Copy link
Contributor Author

sweep-nightly bot commented Jul 29, 2023

GitHub actions yielded the following error.

The command that failed is actions/setup-python@v2 with the error message "Version 3.1 with arch x64 not found". Here are the relevant lines from the logs:

##[group]Run actions/setup-python@v2
with:
python-version: 3.1
token: ***
##[endgroup]
Version 3.1 was not found in the local cache
##[error]Version 3.1 with arch x64 not found
list of all available versions can be found here: https://raw.githubusercontent.com/actions/python-versions/main/versions-manifest.json

This is likely a linting or type-checking issue with the source code but if you are updating the GitHub Actions or versioning, this could be an issue with the GitHub Action yaml files.

@sweep-nightly
Copy link
Contributor Author

sweep-nightly bot commented Jul 29, 2023

GitHub actions yielded the following error.

The command that failed is actions/setup-python@v2 with the error message "Version 3.1 with arch x64 not found". Here are the relevant lines from the logs:

##[group]Run actions/setup-python@v2
with:
python-version: 3.1
token: ***
##[endgroup]
Version 3.1 was not found in the local cache
##[error]Version 3.1 with arch x64 not found
list of all available versions can be found here: https://raw.githubusercontent.com/actions/python-versions/main/versions-manifest.json

This is likely a linting or type-checking issue with the source code but if you are updating the GitHub Actions or versioning, this could be an issue with the GitHub Action yaml files.

@sweep-nightly
Copy link
Contributor Author

sweep-nightly bot commented Jul 29, 2023

GitHub actions yielded the following error.

The command that failed is actions/setup-python@v2 with the error message "Version 3.1 with arch x64 not found". Here are the relevant lines from the logs:

##[group]Run actions/setup-python@v2
with:
python-version: 3.1
token: ***
##[endgroup]
Version 3.1 was not found in the local cache
##[error]Version 3.1 with arch x64 not found
list of all available versions can be found here: https://raw.githubusercontent.com/actions/python-versions/main/versions-manifest.json

This is likely a linting or type-checking issue with the source code but if you are updating the GitHub Actions or versioning, this could be an issue with the GitHub Action yaml files.

@sweep-nightly
Copy link
Contributor Author

sweep-nightly bot commented Jul 29, 2023

GitHub actions yielded the following error.

The command that failed is actions/setup-python@v2 with the error message "Version 3.1 with arch x64 not found". Here are the relevant lines from the logs:

##[group]Run actions/setup-python@v2
with:
python-version: 3.1
token: ***
##[endgroup]
Version 3.1 was not found in the local cache
##[error]Version 3.1 with arch x64 not found
list of all available versions can be found here: https://raw.githubusercontent.com/actions/python-versions/main/versions-manifest.json

This is likely a linting or type-checking issue with the source code but if you are updating the GitHub Actions or versioning, this could be an issue with the GitHub Action yaml files.

@sweep-nightly
Copy link
Contributor Author

sweep-nightly bot commented Jul 29, 2023

GitHub actions yielded the following error.

The relevant lines from the logs corresponding to the error are:

##[group]Run actions/setup-python@v2
with:
python-version: 3.1
token: ***
##[endgroup]
Version 3.1 was not found in the local cache
##[error]Version 3.1 with arch x64 not found
list of all available versions can be found here: https://raw.githubusercontent.com/actions/python-versions/main/versions-manifest.json

The command that failed is actions/setup-python@v2 with the specified Python version 3.1.

This is likely a linting or type-checking issue with the source code but if you are updating the GitHub Actions or versioning, this could be an issue with the GitHub Action yaml files.

@sweep-nightly
Copy link
Contributor Author

sweep-nightly bot commented Jul 29, 2023

GitHub actions yielded the following error.

The command that failed is actions/setup-python@v2 with the error message "Version 3.1 with arch x64 not found". Here are the relevant lines from the logs:

##[group]Run actions/setup-python@v2
with:
python-version: 3.1
token: ***
##[endgroup]
Version 3.1 was not found in the local cache
##[error]Version 3.1 with arch x64 not found
list of all available versions can be found here: https://raw.githubusercontent.com/actions/python-versions/main/versions-manifest.json

This is likely a linting or type-checking issue with the source code but if you are updating the GitHub Actions or versioning, this could be an issue with the GitHub Action yaml files.

@sweep-nightly
Copy link
Contributor Author

sweep-nightly bot commented Jul 29, 2023

GitHub actions yielded the following error.

The command that failed is actions/setup-python@v2 with the error message "Version 3.1 with arch x64 not found". Here are the relevant lines from the logs:

##[group]Run actions/setup-python@v2
with:
python-version: 3.1
token: ***
##[endgroup]
Version 3.1 was not found in the local cache
##[error]Version 3.1 with arch x64 not found
list of all available versions can be found here: https://raw.githubusercontent.com/actions/python-versions/main/versions-manifest.json

This is likely a linting or type-checking issue with the source code but if you are updating the GitHub Actions or versioning, this could be an issue with the GitHub Action yaml files.

@sweep-nightly
Copy link
Contributor Author

sweep-nightly bot commented Jul 29, 2023

GitHub actions yielded the following error.

The command that failed is actions/setup-python@v2 with the error message "Version 3.1 with arch x64 not found". Here are the relevant lines from the logs:

##[group]Run actions/setup-python@v2
with:
python-version: 3.1
token: ***
##[endgroup]
Version 3.1 was not found in the local cache
##[error]Version 3.1 with arch x64 not found
list of all available versions can be found here: https://raw.githubusercontent.com/actions/python-versions/main/versions-manifest.json

This is likely a linting or type-checking issue with the source code but if you are updating the GitHub Actions or versioning, this could be an issue with the GitHub Action yaml files.

@sweep-nightly
Copy link
Contributor Author

sweep-nightly bot commented Jul 29, 2023

GitHub actions yielded the following error.

The command that failed is actions/setup-python@v2 with the error message "Version 3.1 with arch x64 not found". Here are the relevant lines from the logs:

##[group]Run actions/setup-python@v2
with:
python-version: 3.1
token: ***
##[endgroup]
Version 3.1 was not found in the local cache
##[error]Version 3.1 with arch x64 not found
list of all available versions can be found here: https://raw.githubusercontent.com/actions/python-versions/main/versions-manifest.json

This is likely a linting or type-checking issue with the source code but if you are updating the GitHub Actions or versioning, this could be an issue with the GitHub Action yaml files.

@sweep-nightly
Copy link
Contributor Author

sweep-nightly bot commented Jul 29, 2023

GitHub actions yielded the following error.

The command that failed is actions/setup-python@v2 with the error message "Version 3.1 with arch x64 not found". Here are the relevant lines from the logs:

##[group]Run actions/setup-python@v2
with:
python-version: 3.1
token: ***
##[endgroup]
Version 3.1 was not found in the local cache
##[error]Version 3.1 with arch x64 not found
list of all available versions can be found here: https://raw.githubusercontent.com/actions/python-versions/main/versions-manifest.json

This is likely a linting or type-checking issue with the source code but if you are updating the GitHub Actions or versioning, this could be an issue with the GitHub Action yaml files.

@sweep-nightly sweep-nightly bot closed this Jul 29, 2023
@sweep-nightly sweep-nightly bot deleted the sweep/add-caching-python-dependencies branch July 29, 2023 22:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sweep Assigns Sweep to an issue or pull request.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Sweep: Can you cache the python dependencies in the github action
0 participants